package org.example.bean;

import org.springframework.stereotype.Component;

// 刻意使用final修饰Boy，使它无法子类化
@Component
public final class Boy {

    private final Girl loveGirl;

    public Boy(Girl girl) {
        this.loveGirl = girl;
    }

    @Override
    public String toString() {
        return "Boy love " + loveGirl;
    }
}
